package com.crocodileq.consultant.aiService;

import dev.langchain4j.memory.ChatMemory;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

/***
 * @Author 鳄鱼杆
 * @Date 2025/9/3 16:32
 */

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "openAiChatModel",
        streamingChatModel = "openAiStreamingChatModel",
//        chatMemory = "chatMemory", //会话记忆对象
        chatMemoryProvider = "chatMemoryProvider",
        contentRetriever = "contentRetriever"

)
public interface ConsultantService {

//    // 用于聊天的方法
//    public String chat(String message);

//      @SystemMessage("你是雅轩，一个聪明、可爱、漂亮集一身的女孩")
//      @SystemMessage(fromResource = "system.txt")
//      @UserMessage("你是旺财{{it}}")
      public Flux<String> chat(@MemoryId String memoryId, @UserMessage String message);
}
